import { Routes, RouterModule }  from '@angular/router';

import { Accountfundsmanagement } from './accountfundsmanagement.component';
import { Useraccount } from './components/useraccount/useraccount.component';
import { Deviceaccount } from './components/deviceaccount/deviceaccount.component';
import { Channelaccount } from './components/channelaccount/channelaccount.component';
import { Consumingrecords } from './components/consuming-records/consuming-records.component';
import { Rechargerecords } from './components/recharge-records/recharge-records.component';

// noinspection TypeScriptValidateTypes
const routes: Routes = [
  {
    path: '',
    component: Accountfundsmanagement,
    children: [
      { path: 'useraccount', component: Useraccount },
      { path: 'useraccount/consumingrecords/:accountId', component: Consumingrecords },
      { path: 'useraccount/rechargerecords/:accountId', component: Rechargerecords },
      { path: 'deviceaccount', component: Deviceaccount },
      { path: 'channelaccount', component: Channelaccount } 
    ]
  }
];

export const routing = RouterModule.forChild(routes);
